<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AIfES 2: ailayer_maxpool2d.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="AIfES_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AIfES 2
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('ailayer__maxpool2d_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">ailayer_maxpool2d.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="ailayer__maxpool2d_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#ifndef AILAYER_MAXPOOL2D_H</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#define AILAYER_MAXPOOL2D_H</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; </div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="aifes__core_8h.html">core/aifes_core.h</a>&quot;</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#define AIFES_CHANNELS_FIRST    1</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#define AIFES_CHANNELS_LAST     -1</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structailayer__maxpool2d.html">ailayer_maxpool2d</a>    <a class="code" href="structailayer__maxpool2d.html">ailayer_maxpool2d_t</a>;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="structailayer__maxpool2d.html">   51</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structailayer__maxpool2d.html">ailayer_maxpool2d</a> {</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="structailayer__maxpool2d.html#ab13782a46e3804246bf82a92955096b3">   52</a></span>&#160;    <a class="code" href="structailayer.html">ailayer_t</a> <a class="code" href="structailayer__maxpool2d.html#ab13782a46e3804246bf82a92955096b3">base</a>; </div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="comment">// Values (configurable)</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="structailayer__maxpool2d.html#ad05b3ff44540cdb867f4ba378e6946ac">   61</a></span>&#160;    uint16_t <a class="code" href="structailayer__maxpool2d.html#ad05b3ff44540cdb867f4ba378e6946ac">pool_size</a>[2];    </div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structailayer__maxpool2d.html#aae9b175c98f22cb88ce0ad348b075d14">   62</a></span>&#160;    uint16_t <a class="code" href="structailayer__maxpool2d.html#aae9b175c98f22cb88ce0ad348b075d14">stride</a>[2];  </div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="structailayer__maxpool2d.html#a959391eb5884c07d76585cdc37480edf">   63</a></span>&#160;    uint16_t <a class="code" href="structailayer__maxpool2d.html#a959391eb5884c07d76585cdc37480edf">padding</a>[2]; <span class="comment">// Must be 0 &gt;= padding &lt; pool_size; -inf padding</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="structailayer__maxpool2d.html#afcee94774a3c5f173a071b67da9cc3a5">   65</a></span>&#160;    int8_t <a class="code" href="structailayer__maxpool2d.html#afcee94774a3c5f173a071b67da9cc3a5">channel_axis</a>; </div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="comment">// Values (autogenerated)</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="structailayer__maxpool2d.html#a35cf89822e8b7b6f813cb86a9f874e48">   73</a></span>&#160;    uint32_t *<a class="code" href="structailayer__maxpool2d.html#a35cf89822e8b7b6f813cb86a9f874e48">max_locations</a>;    </div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="structailayer__maxpool2d.html#a590c48e998a8a740439e38d0aa4302dd">   75</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structailayer__maxpool2d.html#a590c48e998a8a740439e38d0aa4302dd">optimem</a>[2];   </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="structailayer__maxpool2d.html#a7d262800ae2b6fe796707e30a6c75c7d">   99</a></span>&#160;    void (*<a class="code" href="structailayer__maxpool2d.html#a7d262800ae2b6fe796707e30a6c75c7d">maxpool2d_fwd</a>)(</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                          <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *input,</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;                          <span class="keyword">const</span> uint16_t <a class="code" href="structailayer__maxpool2d.html#ad05b3ff44540cdb867f4ba378e6946ac">pool_size</a>[2],</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;                          <span class="keyword">const</span> uint16_t <a class="code" href="structailayer__maxpool2d.html#aae9b175c98f22cb88ce0ad348b075d14">stride</a>[2],</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;                          <span class="keyword">const</span> uint16_t <a class="code" href="structailayer__maxpool2d.html#a959391eb5884c07d76585cdc37480edf">padding</a>[2],</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;                          int8_t <a class="code" href="structailayer__maxpool2d.html#afcee94774a3c5f173a071b67da9cc3a5">channel_axis</a>,</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;                          <span class="keywordtype">void</span> *work_space,</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;                          uint32_t *<a class="code" href="structailayer__maxpool2d.html#a35cf89822e8b7b6f813cb86a9f874e48">max_locations</a>,</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;                          <a class="code" href="structaitensor.html">aitensor_t</a> *output</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;                          );</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160; </div>
<div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="structailayer__maxpool2d.html#aa70a34f7f0274c5ce34bb63aff19f70f">  126</a></span>&#160;    void (*<a class="code" href="structailayer__maxpool2d.html#aa70a34f7f0274c5ce34bb63aff19f70f">maxpool2d_bwd</a>)(</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;                          <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *delta_out,</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;                          <span class="keyword">const</span> uint16_t <a class="code" href="structailayer__maxpool2d.html#ad05b3ff44540cdb867f4ba378e6946ac">pool_size</a>[2],</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;                          <span class="keyword">const</span> uint16_t <a class="code" href="structailayer__maxpool2d.html#aae9b175c98f22cb88ce0ad348b075d14">stride</a>[2],</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;                          <span class="keyword">const</span> uint16_t <a class="code" href="structailayer__maxpool2d.html#a959391eb5884c07d76585cdc37480edf">padding</a>[2],</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;                          int8_t <a class="code" href="structailayer__maxpool2d.html#afcee94774a3c5f173a071b67da9cc3a5">channel_axis</a>,</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;                          <span class="keywordtype">void</span> *work_space,</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;                          <span class="keyword">const</span> uint32_t *<a class="code" href="structailayer__maxpool2d.html#a35cf89822e8b7b6f813cb86a9f874e48">max_locations</a>,</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;                          <a class="code" href="structaitensor.html">aitensor_t</a> *delta_in</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;                          );</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160; </div>
<div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="structailayer__maxpool2d.html#a2228267b8286358702df06ee781106b6">  138</a></span>&#160;    uint16_t <a class="code" href="structailayer__maxpool2d.html#a2228267b8286358702df06ee781106b6">result_shape</a>[4]; </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;};</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="structaicore__layertype.html">aicore_layertype_t</a> *<a class="code" href="ailayer__maxpool2d_8h.html#a4487d1de4f6a327ef9860f98f8be6a6c">ailayer_maxpool2d_type</a>;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160; </div>
<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="ailayer__maxpool2d_8h.html#a28bc292d407a35b32aabf14e173f54e1">  159</a></span>&#160;<a class="code" href="structailayer.html">ailayer_t</a> *<a class="code" href="ailayer__maxpool2d_8h.html#a28bc292d407a35b32aabf14e173f54e1">ailayer_maxpool2d</a>(<a class="code" href="structailayer__maxpool2d.html">ailayer_maxpool2d_t</a> *layer, <a class="code" href="structailayer.html">ailayer_t</a> *input_layer);</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160; </div>
<div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="ailayer__maxpool2d_8h.html#a36b772521d7348550ed2756106eea5ab">  173</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="ailayer__maxpool2d_8h.html#a36b772521d7348550ed2756106eea5ab">ailayer_maxpool2d_forward</a>(<a class="code" href="structailayer.html">ailayer_t</a> *<span class="keyword">self</span>);</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160; </div>
<div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="ailayer__maxpool2d_8h.html#a63b84ad2c17fb564a4b321427e5b325d">  187</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="ailayer__maxpool2d_8h.html#a63b84ad2c17fb564a4b321427e5b325d">ailayer_maxpool2d_backward</a>(<a class="code" href="structailayer.html">ailayer_t</a> *<span class="keyword">self</span>);</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160; </div>
<div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="ailayer__maxpool2d_8h.html#aa1d1dfd5e265500604574adda02050a8">  204</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="ailayer__maxpool2d_8h.html#aa1d1dfd5e265500604574adda02050a8">ailayer_maxpool2d_calc_result_shape</a>(<a class="code" href="structailayer.html">ailayer_t</a> *<span class="keyword">self</span>);</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160; </div>
<div class="line"><a name="l00215"></a><span class="lineno"><a class="line" href="ailayer__maxpool2d_8h.html#a3e00dc97dd7b07ece086a40445735b43">  215</a></span>&#160;uint32_t <a class="code" href="ailayer__maxpool2d_8h.html#a3e00dc97dd7b07ece086a40445735b43">ailayer_maxpool2d_sizeof_trainmem</a>(<span class="keyword">const</span> <a class="code" href="structailayer.html">ailayer_t</a> *<span class="keyword">self</span>);</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160; </div>
<div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="ailayer__maxpool2d_8h.html#a09b4385fa2b5c8606f33fe1b62caf235">  226</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="ailayer__maxpool2d_8h.html#a09b4385fa2b5c8606f33fe1b62caf235">ailayer_maxpool2d_set_trainmem</a>(<a class="code" href="structailayer.html">ailayer_t</a> *<span class="keyword">self</span>, <span class="keywordtype">void</span> *memory_ptr);</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160; </div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;<span class="preprocessor">#ifdef AIDEBUG_PRINT_MODULE_SPECS</span></div>
<div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="ailayer__maxpool2d_8h.html#ad141fd613fa8aed4795b1d943aceb99d">  233</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="ailayer__maxpool2d_8h.html#ad141fd613fa8aed4795b1d943aceb99d">ailayer_maxpool2d_print_specs</a>(<span class="keyword">const</span> <a class="code" href="structailayer.html">ailayer_t</a> *<span class="keyword">self</span>);</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// AIDEBUG_PRINT_MODULE_SPECS</span></div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160; </div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// AILAYER_MAXPOOL2D_H</span></div>
<div class="ttc" id="aaifes__core_8h_html"><div class="ttname"><a href="aifes__core_8h.html">aifes_core.h</a></div><div class="ttdoc">AIfES 2 core interface.</div></div>
<div class="ttc" id="aailayer__maxpool2d_8h_html_a09b4385fa2b5c8606f33fe1b62caf235"><div class="ttname"><a href="ailayer__maxpool2d_8h.html#a09b4385fa2b5c8606f33fe1b62caf235">ailayer_maxpool2d_set_trainmem</a></div><div class="ttdeci">void ailayer_maxpool2d_set_trainmem(ailayer_t *self, void *memory_ptr)</div><div class="ttdoc">Distribute provided memory to the gradients pointers.</div></div>
<div class="ttc" id="aailayer__maxpool2d_8h_html_a28bc292d407a35b32aabf14e173f54e1"><div class="ttname"><a href="ailayer__maxpool2d_8h.html#a28bc292d407a35b32aabf14e173f54e1">ailayer_maxpool2d</a></div><div class="ttdeci">ailayer_t * ailayer_maxpool2d(ailayer_maxpool2d_t *layer, ailayer_t *input_layer)</div><div class="ttdoc">Initialize and connect the given MaxPool2D layer.</div></div>
<div class="ttc" id="aailayer__maxpool2d_8h_html_a36b772521d7348550ed2756106eea5ab"><div class="ttname"><a href="ailayer__maxpool2d_8h.html#a36b772521d7348550ed2756106eea5ab">ailayer_maxpool2d_forward</a></div><div class="ttdeci">void ailayer_maxpool2d_forward(ailayer_t *self)</div><div class="ttdoc">Calculate the forward pass for given MaxPool2D layer.</div></div>
<div class="ttc" id="aailayer__maxpool2d_8h_html_a3e00dc97dd7b07ece086a40445735b43"><div class="ttname"><a href="ailayer__maxpool2d_8h.html#a3e00dc97dd7b07ece086a40445735b43">ailayer_maxpool2d_sizeof_trainmem</a></div><div class="ttdeci">uint32_t ailayer_maxpool2d_sizeof_trainmem(const ailayer_t *self)</div><div class="ttdoc">Calculate and return the memory size needed by this layer for training.</div></div>
<div class="ttc" id="aailayer__maxpool2d_8h_html_a4487d1de4f6a327ef9860f98f8be6a6c"><div class="ttname"><a href="ailayer__maxpool2d_8h.html#a4487d1de4f6a327ef9860f98f8be6a6c">ailayer_maxpool2d_type</a></div><div class="ttdeci">const aicore_layertype_t * ailayer_maxpool2d_type</div><div class="ttdoc">MaxPool2D layer type.</div></div>
<div class="ttc" id="aailayer__maxpool2d_8h_html_a63b84ad2c17fb564a4b321427e5b325d"><div class="ttname"><a href="ailayer__maxpool2d_8h.html#a63b84ad2c17fb564a4b321427e5b325d">ailayer_maxpool2d_backward</a></div><div class="ttdeci">void ailayer_maxpool2d_backward(ailayer_t *self)</div><div class="ttdoc">Calculate the backward pass for given MaxPool2D layer.</div></div>
<div class="ttc" id="aailayer__maxpool2d_8h_html_aa1d1dfd5e265500604574adda02050a8"><div class="ttname"><a href="ailayer__maxpool2d_8h.html#aa1d1dfd5e265500604574adda02050a8">ailayer_maxpool2d_calc_result_shape</a></div><div class="ttdeci">void ailayer_maxpool2d_calc_result_shape(ailayer_t *self)</div><div class="ttdoc">Calculate the shape of the result tensor (ailayer.result)</div></div>
<div class="ttc" id="aailayer__maxpool2d_8h_html_ad141fd613fa8aed4795b1d943aceb99d"><div class="ttname"><a href="ailayer__maxpool2d_8h.html#ad141fd613fa8aed4795b1d943aceb99d">ailayer_maxpool2d_print_specs</a></div><div class="ttdeci">void ailayer_maxpool2d_print_specs(const ailayer_t *self)</div><div class="ttdoc">Print the layer specification.</div></div>
<div class="ttc" id="astructaicore__layertype_html"><div class="ttname"><a href="structaicore__layertype.html">aicore_layertype</a></div><div class="ttdoc">Type indicator of the layer.</div><div class="ttdef"><b>Definition:</b> aifes_core.h:82</div></div>
<div class="ttc" id="astructailayer__maxpool2d_html"><div class="ttname"><a href="structailayer__maxpool2d.html">ailayer_maxpool2d</a></div><div class="ttdoc">General layer  structure.</div><div class="ttdef"><b>Definition:</b> ailayer_maxpool2d.h:51</div></div>
<div class="ttc" id="astructailayer__maxpool2d_html_a2228267b8286358702df06ee781106b6"><div class="ttname"><a href="structailayer__maxpool2d.html#a2228267b8286358702df06ee781106b6">ailayer_maxpool2d::result_shape</a></div><div class="ttdeci">uint16_t result_shape[4]</div><div class="ttdoc">The shape of the result.</div><div class="ttdef"><b>Definition:</b> ailayer_maxpool2d.h:138</div></div>
<div class="ttc" id="astructailayer__maxpool2d_html_a35cf89822e8b7b6f813cb86a9f874e48"><div class="ttname"><a href="structailayer__maxpool2d.html#a35cf89822e8b7b6f813cb86a9f874e48">ailayer_maxpool2d::max_locations</a></div><div class="ttdeci">uint32_t * max_locations</div><div class="ttdoc">Pointer to memory section where the indices of the maximum values per pooling window are stored.</div><div class="ttdef"><b>Definition:</b> ailayer_maxpool2d.h:73</div></div>
<div class="ttc" id="astructailayer__maxpool2d_html_a590c48e998a8a740439e38d0aa4302dd"><div class="ttname"><a href="structailayer__maxpool2d.html#a590c48e998a8a740439e38d0aa4302dd">ailayer_maxpool2d::optimem</a></div><div class="ttdeci">void * optimem[2]</div><div class="ttdoc">Memory field used by the optimizer for training.</div><div class="ttdef"><b>Definition:</b> ailayer_maxpool2d.h:75</div></div>
<div class="ttc" id="astructailayer__maxpool2d_html_a7d262800ae2b6fe796707e30a6c75c7d"><div class="ttname"><a href="structailayer__maxpool2d.html#a7d262800ae2b6fe796707e30a6c75c7d">ailayer_maxpool2d::maxpool2d_fwd</a></div><div class="ttdeci">void(* maxpool2d_fwd)(const aitensor_t *input, const uint16_t pool_size[2], const uint16_t stride[2], const uint16_t padding[2], int8_t channel_axis, void *work_space, uint32_t *max_locations, aitensor_t *output)</div><div class="ttdoc">Required math function: 2D Max-Pooling.</div><div class="ttdef"><b>Definition:</b> ailayer_maxpool2d.h:99</div></div>
<div class="ttc" id="astructailayer__maxpool2d_html_a959391eb5884c07d76585cdc37480edf"><div class="ttname"><a href="structailayer__maxpool2d.html#a959391eb5884c07d76585cdc37480edf">ailayer_maxpool2d::padding</a></div><div class="ttdeci">uint16_t padding[2]</div><div class="ttdoc">The (symmetric) minus infinity padding in the direction of height and width ( ).</div><div class="ttdef"><b>Definition:</b> ailayer_maxpool2d.h:63</div></div>
<div class="ttc" id="astructailayer__maxpool2d_html_aa70a34f7f0274c5ce34bb63aff19f70f"><div class="ttname"><a href="structailayer__maxpool2d.html#aa70a34f7f0274c5ce34bb63aff19f70f">ailayer_maxpool2d::maxpool2d_bwd</a></div><div class="ttdeci">void(* maxpool2d_bwd)(const aitensor_t *delta_out, const uint16_t pool_size[2], const uint16_t stride[2], const uint16_t padding[2], int8_t channel_axis, void *work_space, const uint32_t *max_locations, aitensor_t *delta_in)</div><div class="ttdoc">Required math function: Gradients of 2D Max-Pooling with respect to the input.</div><div class="ttdef"><b>Definition:</b> ailayer_maxpool2d.h:126</div></div>
<div class="ttc" id="astructailayer__maxpool2d_html_aae9b175c98f22cb88ce0ad348b075d14"><div class="ttname"><a href="structailayer__maxpool2d.html#aae9b175c98f22cb88ce0ad348b075d14">ailayer_maxpool2d::stride</a></div><div class="ttdeci">uint16_t stride[2]</div><div class="ttdoc">The stride in the direction of height and width ( ).</div><div class="ttdef"><b>Definition:</b> ailayer_maxpool2d.h:62</div></div>
<div class="ttc" id="astructailayer__maxpool2d_html_ab13782a46e3804246bf82a92955096b3"><div class="ttname"><a href="structailayer__maxpool2d.html#ab13782a46e3804246bf82a92955096b3">ailayer_maxpool2d::base</a></div><div class="ttdeci">ailayer_t base</div><div class="ttdoc">Inherited field members from general ailayer struct.</div><div class="ttdef"><b>Definition:</b> ailayer_maxpool2d.h:52</div></div>
<div class="ttc" id="astructailayer__maxpool2d_html_ad05b3ff44540cdb867f4ba378e6946ac"><div class="ttname"><a href="structailayer__maxpool2d.html#ad05b3ff44540cdb867f4ba378e6946ac">ailayer_maxpool2d::pool_size</a></div><div class="ttdeci">uint16_t pool_size[2]</div><div class="ttdoc">Size of the pooling kernel ( ).</div><div class="ttdef"><b>Definition:</b> ailayer_maxpool2d.h:61</div></div>
<div class="ttc" id="astructailayer__maxpool2d_html_afcee94774a3c5f173a071b67da9cc3a5"><div class="ttname"><a href="structailayer__maxpool2d.html#afcee94774a3c5f173a071b67da9cc3a5">ailayer_maxpool2d::channel_axis</a></div><div class="ttdeci">int8_t channel_axis</div><div class="ttdoc">Index of the channel axis (1 for channels first and -1 or 3 for channels last).</div><div class="ttdef"><b>Definition:</b> ailayer_maxpool2d.h:65</div></div>
<div class="ttc" id="astructailayer_html"><div class="ttname"><a href="structailayer.html">ailayer</a></div><div class="ttdoc">AIfES layer interface.</div><div class="ttdef"><b>Definition:</b> aifes_core.h:252</div></div>
<div class="ttc" id="astructaitensor_html"><div class="ttname"><a href="structaitensor.html">aitensor</a></div><div class="ttdoc">A tensor in AIfES.</div><div class="ttdef"><b>Definition:</b> aifes_math.h:89</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_5233a5861230ad4bc52bfd822c86fe04.html">cnn</a></li><li class="navelem"><a class="el" href="dir_a5c91e9bbf64c4b6a24d0c0102e9d7da.html">base</a></li><li class="navelem"><a class="el" href="dir_115795935351339455fee6eae515097b.html">ailayer</a></li><li class="navelem"><a class="el" href="ailayer__maxpool2d_8h.html">ailayer_maxpool2d.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
